package cn.edu.wfit.modules.learn.service.impl.competitionmanagement;

import java.util.List;
import cn.edu.wfit.common.core.utils.DateUtils;
import cn.edu.wfit.modules.learn.domain.WfitCompetitionTeamrecord;
import cn.edu.wfit.modules.learn.mapper.competitionmanagement.WfitCompetitionTeamrecordMapper;
import cn.edu.wfit.modules.learn.service.competitionmanagement.IWfitCompetitionTeamrecordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


/**
 * 团队赛记录Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-07-28
 */
@Service
public class WfitCompetitionTeamrecordServiceImpl implements IWfitCompetitionTeamrecordService
{
    @Autowired
    private WfitCompetitionTeamrecordMapper wfitCompetitionTeamrecordMapper;

    /**
     * 查询团队赛记录
     * 
     * @param id 团队赛记录主键
     * @return 团队赛记录
     */
    @Override
    public WfitCompetitionTeamrecord selectWfitCompetitionTeamrecordById(Long id)
    {
        return wfitCompetitionTeamrecordMapper.selectWfitCompetitionTeamrecordById(id);
    }

    /**
     * 查询团队赛记录列表
     * 
     * @param wfitCompetitionTeamrecord 团队赛记录
     * @return 团队赛记录
     */
    @Override
    public List<WfitCompetitionTeamrecord> selectWfitCompetitionTeamrecordList(WfitCompetitionTeamrecord wfitCompetitionTeamrecord)
    {
        return wfitCompetitionTeamrecordMapper.selectWfitCompetitionTeamrecordList(wfitCompetitionTeamrecord);
    }

    /**
     * 新增团队赛记录
     * 
     * @param wfitCompetitionTeamrecord 团队赛记录
     * @return 结果
     */
    @Override
    public int insertWfitCompetitionTeamrecord(WfitCompetitionTeamrecord wfitCompetitionTeamrecord)
    {
        wfitCompetitionTeamrecord.setCreateTime(DateUtils.getNowDate());
        return wfitCompetitionTeamrecordMapper.insertWfitCompetitionTeamrecord(wfitCompetitionTeamrecord);
    }

    /**
     * 修改团队赛记录
     * 
     * @param wfitCompetitionTeamrecord 团队赛记录
     * @return 结果
     */
    @Override
    public int updateWfitCompetitionTeamrecord(WfitCompetitionTeamrecord wfitCompetitionTeamrecord)
    {
        wfitCompetitionTeamrecord.setUpdateTime(DateUtils.getNowDate());
        return wfitCompetitionTeamrecordMapper.updateWfitCompetitionTeamrecord(wfitCompetitionTeamrecord);
    }

    /**
     * 批量删除团队赛记录
     * 
     * @param ids 需要删除的团队赛记录主键
     * @return 结果
     */
    @Override
    public int deleteWfitCompetitionTeamrecordByIds(Long[] ids)
    {
        return wfitCompetitionTeamrecordMapper.deleteWfitCompetitionTeamrecordByIds(ids);
    }

    /**
     * 删除团队赛记录信息
     * 
     * @param id 团队赛记录主键
     * @return 结果
     */
    @Override
    public int deleteWfitCompetitionTeamrecordById(Long id)
    {
        return wfitCompetitionTeamrecordMapper.deleteWfitCompetitionTeamrecordById(id);
    }
}
